package adv.i31.robot;

import android.app.Activity;
import android.content.Context;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import android.widget.Button;

public class Control extends Activity {

	public Control(Context context) {
		Button buttonXMinus = (Button) findViewById(R.id.buttonXMinus);	
		buttonXMinus.setOnTouchListener(new OnTouchListener() {
			public boolean onTouch(View v, MotionEvent event) {
				switch (event.getAction()) {
					case MotionEvent.ACTION_DOWN:
						System.out.println("buttonXMinus ACTION_DOWN");
						return false;
					case MotionEvent.ACTION_UP:
						System.out.println("buttonXMinus ACTION_UP");
						return false;
				}
				// Listener did not consume the event
				return false;
			}
		});
		
		
		Button buttonXPlus = (Button) findViewById(R.id.buttonXPlus);	
		buttonXPlus.setOnTouchListener(new OnTouchListener() {
			public boolean onTouch(View v, MotionEvent event) {
				switch (event.getAction()) {
					case MotionEvent.ACTION_DOWN:
						System.out.println("buttonXPlus ACTION_DOWN");
						return false;
					case MotionEvent.ACTION_UP:
						System.out.println("buttonXPlus ACTION_UP");
						return false;
				}
				// Listener did not consume the event
				return false;
			}
		});
		
		Button buttonAus = (Button) findViewById(R.id.buttonAus);	
		buttonAus.setOnTouchListener(new OnTouchListener() {
			public boolean onTouch(View v, MotionEvent event) {
				switch (event.getAction()) {
					case MotionEvent.ACTION_DOWN:
						System.out.println("buttonAus ACTION_DOWN");
						return false;
					case MotionEvent.ACTION_UP:
						System.out.println("buttonAus ACTION_UP");
						return false;
				}
				// Listener did not consume the event
				return false;
			}
		});
		
		Button buttonYPlus = (Button) findViewById(R.id.ButtonYPlus);	
		buttonYPlus.setOnTouchListener(new OnTouchListener() {
			public boolean onTouch(View v, MotionEvent event) {
				switch (event.getAction()) {
					case MotionEvent.ACTION_DOWN:
						System.out.println("buttonYPlus ACTION_DOWN");
						return false;
					case MotionEvent.ACTION_UP:
						System.out.println("buttonYPlus ACTION_UP");
						return false;
				}
				// Listener did not consume the event
				return false;
			}
		});
		
		Button buttonYMinus = (Button) findViewById(R.id.buttonYMinus);	
		buttonYMinus.setOnTouchListener(new OnTouchListener() {
			public boolean onTouch(View v, MotionEvent event) {
				switch (event.getAction()) {
					case MotionEvent.ACTION_DOWN:
						System.out.println("buttonYMinus ACTION_DOWN");
						return false;
					case MotionEvent.ACTION_UP:
						System.out.println("buttonYMinus ACTION_UP");
						return false;
				}
				// Listener did not consume the event
				return false;
			}
		});
		
		Button buttonZMinus = (Button) findViewById(R.id.buttonZMinus);	
		buttonZMinus.setOnTouchListener(new OnTouchListener() {
			public boolean onTouch(View v, MotionEvent event) {
				switch (event.getAction()) {
					case MotionEvent.ACTION_DOWN:
						System.out.println("buttonZMinus ACTION_DOWN");
						return false;
					case MotionEvent.ACTION_UP:
						System.out.println("buttonZMinus ACTION_UP");
						return false;
				}
				// Listener did not consume the event
				return false;
			}
		});
		
		Button buttonZPlus = (Button) findViewById(R.id.buttonZPlus);	
		buttonZPlus.setOnTouchListener(new OnTouchListener() {
			public boolean onTouch(View v, MotionEvent event) {
				switch (event.getAction()) {
					case MotionEvent.ACTION_DOWN:
						System.out.println("buttonZPlus ACTION_DOWN");
						return false;
					case MotionEvent.ACTION_UP:
						System.out.println("buttonZPlus ACTION_UP");
						return false;
				}
				// Listener did not consume the event
				return false;
			}
		});
	}


}
